package controllers

import (
	"gitee.com/yxd1990/golang-common/constants"
)

type ErrorController struct {
	BaseController
}

func (this *ErrorController) Error501() {
	defer handleError()
	this.Fail("系统异常")
}

func (this *ErrorController) Error404() {
	defer handleError()
	this.Fail("404 error")
}
func handleError() {
	if recover() != nil {

	}
}

func (this *ErrorController) Error403() {
	defer handleError()
	this.Fail("403 error", constants.NotLogin)
}

